package com.tsmti.system.entity;

import com.tsmti.core.common.entity.BaseDataEntity;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.Where;

import javax.persistence.*;

/**
 * @Package：com.tsmti.system.entity
 * @Class：UserPageColumn
 * @Description： 用户列字段配置
 * @Author：zcw
 * @Date：Created in 2018/5/29 11:12
 * @Company:
 * @Version：
 * @Modified By:
 */
@Entity
@Table(name = "pims_user_pagecol")
@DynamicUpdate
@DynamicInsert
@Where(clause = "delFlag = 0")
public class UserPageColumn extends BaseDataEntity<Long> {
    /**编码*/
    private Long id;
    /**页面编码*/
    private String pageId;
    /**用户账号*/
    private String userName;
    /**对应systemPageColumn列ID*/
    private Long colId;
    /**排序值*/
    private Integer orders;
    /**是否固定宽度*/
    private Integer onlyWidth;
    /**宽度值*/
    private String colWidth;

    public UserPageColumn() {
        super.isDelete = Boolean.FALSE;
    }

    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_USERPAGECOLUMN")
    @SequenceGenerator(name = "SEQ_USERPAGECOLUMN", sequenceName = "userpagecolumn_sequence", allocationSize = 1)
    @Override
    public Long getId() {
        return id;
    }

    @Override
    public void setId(Long id) {
        this.id = id;
    }

    public String getPageId() {
        return pageId;
    }

    public void setPageId(String pageId) {
        this.pageId = pageId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Long getColId() {
        return colId;
    }

    public void setColId(Long colId) {
        this.colId = colId;
    }

    public Integer getOrders() {
        return orders;
    }

    public void setOrders(Integer orders) {
        this.orders = orders;
    }

    public Integer getOnlyWidth() {
        return onlyWidth;
    }

    public void setOnlyWidth(Integer onlyWidth) {
        this.onlyWidth = onlyWidth;
    }

    public String getColWidth() {
        return colWidth;
    }

    public void setColWidth(String colWidth) {
        this.colWidth = colWidth;
    }
}
